@extends('seller.layouts.app')

@section('panel_content')

<div class="aiz-titlebar mt-2 mb-4" style="display:none;">
    <div class="row align-items-center">
        <div class="col-md-6">
            <h1 class="h3">{{ translate('Money Withdraw') }}</h1>
        </div>
    </div>
</div>

<div class="row gutters-0 caiwutop">
    <div class="caiwutopL">
        @if (Auth::user()->shop->logo != null)
        <img
            src="{{ uploaded_asset(Auth::user()->avatar_original) }}"
            onerror="this.onerror=null;this.src='{{ static_asset('assets/img/avatar-place.png') }}';" style="width:50%;height:auto"
        >
        @else
        <img class="" src="{{ uploaded_asset(get_setting('header_logo')) }}" class="brand-icon"  style="width:50%;height:auto"
             alt="{{ get_setting('site_name') }}">
        @endif
        <h3 class="fs-16  m-0 ">{{Auth::user()->name}}</h3>
    </div>
    <div class="caiwutopR  caiwutopR1">

    </div>
    <div class="caiwutopM">
        <div class="cw ">
            <div class="overflow-hidden cw1">

                <div class="">
                    <div class="h4 fw-700">{{ single_price(Auth::user()->shop->admin_to_pay) }}</div>
                    <div class="opacity-50">{{ translate('Pending Balance') }}</div>
                </div>
            </div>
        </div>
        <div class="cw ">
            <div class="cw2 overflow-hidden">

                <div class="">
                    <div class="h4 fw-700 ">{{ single_price(Auth::user()->balance) }}</div>
                    <div class="opacity-50 ">{{ translate('Wallet Money') }}</div>
                </div>
            </div>
        </div>
        <div class="cw ">
            <div class="cw3 overflow-hidden">

                <div class="">


                    <div class="h4 fw-700 "> {{ single_price( Auth::user()->shop->bzj_money) }}</div>
                    <div class="opacity-50"> {{translate('Guarantee Money')}}</div>
                </div>
            </div>
        </div>
        <div class="cwbtn">
            <div
                class="cwbtn1  rounded mb-3 c-pointer text-center shadow-sm hov-shadow-lg has-transition"
                onclick="show_request_modal()">

                <div class="fs-16 text-white">{{ translate('Send Withdraw Request') }}</div>
            </div>
        </div>
        <div class="cwbtn">
            @if($parent)
            <div class="cwbtn1  rounded mb-3 c-pointer text-center shadow-sm hov-shadow-lg has-transition"
                onclick="window.open('{{$parent->customer_service_link}}')">
                <div class="fs-16 text-white">{{ translate('Online Service') }}</div>
            </div>
            @endif
        </div>
        @if (addon_is_activated('offline_payment'))
        <div class="cwbtn">
            <div
                class="cwbtn2  rounded mb-3 c-pointer text-center shadow-sm hov-shadow-lg has-transition"
                onclick="show_make_wallet_recharge_modal(1)">

                <div class="fs-16 ">{{ translate('Offline Recharge Wallet') }}</div>
            </div>
        </div>

        <div class="cwbtn">
            <div
                class="cwbtn2  rounded mb-3 c-pointer text-center  shadow-sm hov-shadow-lg has-transition"
                onclick="show_make_wallet_recharge_modal(2)">

                <div class="fs-16">{{ translate('Guarantee Recharge') }}</div>
            </div>
        </div>


        @endif
    </div>
    <div class="caiwutopR caiwutopR2">

    </div>

</div>

<div class="card dattu" style="overflow:hidden;">
    <div class="card-header" style="justify-content: flex-start;">
        <h5 class="mb-1 h6 active" style="font-size:0.8rem">{{ translate('Withdraw Request history')}}</h5>
        <h5 class="mb-1 h6"style="font-size:0.8rem">{{ translate('Froze Order')}}</h5>
        <h5 class="mb-1 h6"style="font-size:0.8rem">{{ translate('Unfrozen Funds Details')}}</h5>
        <h5 class="mb-1 h6"style="font-size:0.8rem">{{ translate('Wallet Recharge History')}}</h5>
        <h5 class="mb-1 h6"style="font-size:0.8rem">{{ translate('Payment History')}}</h5>
    </div>
    <div class="card-body" style="overflow: scroll;display:block">
        <table class="table aiz-table mb-0">
            <thead>
            <tr>
                <th>#</th>
                <th>{{ translate('Date') }}</th>
                <th>{{ translate('Amount')}}</th>
                <th>{{ translate('Type')}}</th>

                <th data-breakpoints="lg">{{ translate('Status')}}</th>
                <th>{{ translate('Withdraw Type')}}</th>
                <th>{{ translate('Remarks')}}</th>
                <th data-breakpoints="lg" width="40%">{{ translate('Message')}}</th>


            </tr>
            </thead>
            <tbody>
            @foreach ($seller_withdraw_requests as $key => $seller_withdraw_request)
            <tr>
                <td>{{ $key+1 }}</td>
                <td>{{ date('Y-m-d H:i:s', strtotime($seller_withdraw_request->created_at)) }}</td>
                <td>{{ single_price($seller_withdraw_request->amount) }}</td>
                <td>
                    @if( $seller_withdraw_request->type == 1)

                    {{translate('User Balance')}}
                    @else

                    {{translate('Guarantee')}}
                    @endif
                </td>
                <td>
                    @if ($seller_withdraw_request->status == 1)
                    <span class=" badge badge-inline"> <img src="{{ static_asset('assets/img/newimg/paid.png') }}" alt="" width="14" style="margin-right:5px">{{ translate('Paid')}}</span>
                    @elseif ($seller_withdraw_request->status == 2)
                    <span class=" badge badge-inline"><img src="{{ static_asset('assets/img/newimg/unpickedup.png') }}" alt="" width="14" style="margin-right:5px">{{ translate('Refuse')}} </span>
                    @else
                    <span class=" badge badge-inline "> <img src="{{ static_asset('assets/img/newimg/pending.png') }}" alt="" width="14" style="margin-right:5px">{{ translate('Pending')}}</span>
                    @endif
                </td>
                <td>

                    @if( $seller_withdraw_request->w_type == 1)

                    {{translate('Cash')}}
                    @elseif( $seller_withdraw_request->w_type == 2)

                    {{translate('Bank')}}
                    @elseif( $seller_withdraw_request->w_type == 3)
                    {{translate('USDT')}}
                    @endif
                </td>
                <td>
                    {{ $seller_withdraw_request->remarks }}
                </td>
                <td>
                    {{ $seller_withdraw_request->message }}
                </td>

            </tr>
            @endforeach
            </tbody>
        </table>
        <div class="aiz-pagination">
            {{ $seller_withdraw_requests->links() }}
        </div>
    </div>

    <div class="card-body " style="display:none">
        <table class="table aiz-table mb-0">
            <thead>
            <tr>
                <th>#</th>
                <th>{{ translate('Order Code') }}</th>
                <th data-breakpoints="md">{{ translate('Amount') }}</th>
                <th data-breakpoints="md">{{ translate('Profit') }}</th>
                <th data-breakpoints="md">{{ translate('Payment Status') }}</th>
                <th data-breakpoints="md">{{ translate('Pick Up Status') }}</th>
                <th>{{ translate('Date') }}</th>
                <th>{{ translate('Unfreeze Countdown') }}</th>
            </tr>
            </thead>
            <tbody>
            @foreach ($freezeOrders as $key => $order)
            <tr>
                <td>{{ $key+1 }}</td>
                <td>{{ $order->code }}</td>
                <td>{{ single_price($order->grand_total) }}</td>
                <td>{{ single_price($order->grand_total - $order->product_storehouse_total) }}</td>
                <td>
                    @if ($order->payment_status == 'paid')
                    <span class="badge badge-inline "> <img src="{{ static_asset('assets/img/newimg/paid.png') }}" alt="" width="14" style="margin-right:5px">{{translate('Paid')}}</span>
                    @else
                    <span class="badge badge-inline "><img src=" {{ static_asset('assets/img/newimg/unpickedup.png') }}" alt="" width="14" style="margin-right:5px">{{translate('Unpaid')}}</span>
                    @endif
                </td>
                <td>
                    @if ($order->product_storehouse_status)
                    <span class="badge badge-inline "><img src="{{ static_asset('assets/img/newimg/paid.png') }}" alt="" width="14" style="margin-right:5px">{{translate('Picked Up')}}</span>
                    @else
                    <span class="badge badge-inline "><img src="{{ static_asset('assets/img/newimg/unpickedup.png') }}" alt="" width="14" style="margin-right:5px">{{translate('Unpicked Up')}}</span>
                    @endif
                </td>
                <td>{{ date('Y-m-d H:i:s', strtotime($order->created_at)) }}</td>
                <td>
                    @if ($order->freeze_expired_at)
                    {{ round(($order->freeze_expired_at - now()->timestamp) / 86400) }} {{translate('Days')}}
                    @else
                    {{translate('Unpicked Up')}}
                    @endif
                </td>
            </tr>
            @endforeach
            </tbody>
        </table>
        <div class="aiz-pagination">
            {{ $freezeOrders->links() }}
        </div>
    </div>

   <div class="card-body " style="display:none">
        <table class="table aiz-table mb-0">
            <thead>
            <tr>
                <th>#</th>
                <th>{{ translate('Order Code') }}</th>
                <th data-breakpoints="md">{{ translate('Amount') }}</th>
                <th>{{ translate('Date') }}</th>
                <th data-breakpoints="md">{{ translate('Before Unfrozen Amount') }}</th>
                <th data-breakpoints="md">{{ translate('After Unfrozen Amount') }}</th>
            </tr>
            </thead>
            <tbody>
            @foreach ($orderFreeUpBook as $key => $order)
            <tr>
                <td>{{ $key+1 }}</td>
                <td>{{ $order->order_code }}</td>
                <td>{{ single_price($order->amount) }}</td>
                <td>{{ date('Y-m-d H:i:s', strtotime($order->created_at)) }}</td>
                <td>{{ single_price($order->before_amount) }}</td>
                <td>{{ single_price($order->after_amount) }}</td>
            </tr>
            @endforeach
            </tbody>
        </table>
        <div class="aiz-pagination">
            {{ $freezeOrders->links() }}
        </div>
    </div>
    <div class="card-body"  style="display:none">
        <table class="table aiz-table mb-0">
            <thead>
            <tr>
                <th>#</th>
                <th data-breakpoints="md">{{ translate('Amount') }}</th>
                <th data-breakpoints="md">{{ translate('Payment method') }}</th>
                <th>{{ translate('Payment Details') }}</th>
                <th data-breakpoints="md">{{ translate('Approval') }}</th>
                <th data-breakpoints="md">{{ translate('Offline payment') }}</th>
                <th data-breakpoints="md">{{ translate('Type') }}</th>
                <th data-breakpoints="md">{{ translate('Receipt') }}</th>
                <th>{{ translate('Date') }}</th>
            </tr>
            </thead>
            <tbody>
            @foreach ($rechargeList as $key => $list)
            <tr>
                <td>{{ $key+1 }}</td>
                <td>{{ single_price($list->amount) }}</td>
                <td>{{ $list->payment_method }}</td>
                <td>{{ $list->payment_details }}</td>
                <td>
                    @if ($list->approval == 1)
                    <span class="badge badge-inline"><img src="{{ static_asset('assets/img/newimg/paid.png') }}" alt="" width="14" style="margin-right:5px">{{translate('yes')}}</span>
                    @else
                    <span class="badge badge-inline"><img src="{{ static_asset('assets/img/newimg/unpickedup.png') }}" alt="" width="14" style="margin-right:5px">{{translate('No')}}</span>
                    @endif
                </td>
                <td>
                    @if ($list->offline_payment == 1)
                    <span class="badge badge-inline"><img src="{{ static_asset('assets/img/newimg/paid.png') }}" alt="" width="14" style="margin-right:5px">{{translate('yes')}}</span>
                    @else
                    <span class="badge badge-inline "><img src="{{ static_asset('assets/img/newimg/unpickedup.png') }}" alt="" width="14" style="margin-right:5px">{{translate('No')}}</span>
                    @endif
                </td>

                <td>
                    @if( $list->type == 1)

                    {{translate('User Balance')}}
                    @else

                    {{translate('Guarantee')}}
                    @endif
                </td>


                <td>{{ $list->reciept }}</td>
                <td>{{ date('Y-m-d H:i:s', strtotime($list->created_at)) }}</td>
            </tr>
            @endforeach
            </tbody>
        </table>
        <div class="aiz-pagination">
            {{ $rechargeList->links() }}
        </div>
    </div>

    <div class="card-body"  style="display:none">
        <table class="table aiz-table mb-0">
            <thead>
            <tr>
                <th>#</th>
                <th data-breakpoints="md">{{ translate('Amount') }}</th>

                <th>{{ translate('Payment Details') }}</th>

                <th data-breakpoints="md">{{ translate('Payment method') }}</th>


                <th>{{ translate('Date') }}</th>
            </tr>
            </thead>
            <tbody>
            @foreach ($paymentList as $key => $list)
            <tr>
                <td>{{ $key+1 }}</td>
                <td>{{ single_price($list->amount) }}</td>

                <td>{{ translate($list->payment_details) }}</td>

                <td>
                    {{translate($list->payment_method)}}
                </td>





                <td>{{ date('Y-m-d H:i:s', strtotime($list->created_at)) }}</td>
            </tr>
            @endforeach
            </tbody>
        </table>
        <div class="aiz-pagination">
            {{ $paymentList->links() }}
        </div>
    </div>

</div>

<!-- 待解冻订单 -->
<div class="card" style="display:none">
    <!--<div class="card-header">-->
    <!--    <h5 class="mb-0 h6">{{ translate('Froze Order')}}</h5>-->
    <!--</div>-->
    <div class="card-body">
        <table class="table aiz-table mb-0">
            <thead>
            <tr>
                <th>#</th>
                <th>{{ translate('Order Code') }}</th>
                <th data-breakpoints="md">{{ translate('Amount') }}</th>
                <th data-breakpoints="md">{{ translate('Profit') }}</th>
                <th data-breakpoints="md">{{ translate('Payment Status') }}</th>
                <th data-breakpoints="md">{{ translate('Pick Up Status') }}</th>
                <th>{{ translate('Date') }}</th>
                <th>{{ translate('Unfreeze Countdown') }}</th>
            </tr>
            </thead>
            <tbody>
            @foreach ($freezeOrders as $key => $order)
            <tr>
                <td>{{ $key+1 }}</td>
                <td>{{ $order->code }}</td>
                <td>{{ single_price($order->grand_total) }}</td>
                <td>{{ single_price($order->grand_total - $order->product_storehouse_total) }}</td>
                <td>
                    @if ($order->payment_status == 'paid')
                    <span class="badge badge-inline "> <img src="{{ static_asset('assets/img/newimg/paid.png') }}" alt="" width="14" style="margin-right:5px">{{translate('Paid')}}</span>
                    @else
                    <span class="badge badge-inline "><img src=" {{ static_asset('assets/img/newimg/unpickedup.png') }}" alt="" width="14" style="margin-right:5px">{{translate('Unpaid')}}</span>
                    @endif
                </td>
                <td>
                    @if ($order->product_storehouse_status)
                    <span class="badge badge-inline "><img src="{{ static_asset('assets/img/newimg/paid.png') }}" alt="" width="14" style="margin-right:5px">{{translate('Picked Up')}}</span>
                    @else
                    <span class="badge badge-inline "><img src="{{ static_asset('assets/img/newimg/unpickedup.png') }}" alt="" width="14" style="margin-right:5px">{{translate('Unpicked Up')}}</span>
                    @endif
                </td>
                <td>{{ date('Y-m-d H:i:s', strtotime($order->created_at)) }}</td>
                <td>
                    @if ($order->freeze_expired_at)
                    {{ round(($order->freeze_expired_at - now()->timestamp) / 86400) }} {{translate('Days')}}
                    @else
                    {{translate('Unpicked Up')}}
                    @endif
                </td>
            </tr>
            @endforeach
            </tbody>
        </table>
        <div class="aiz-pagination">
            {{ $freezeOrders->links() }}
        </div>
    </div>
</div>

<!-- 充值记录 -->
<div class="card" style="display:none">
    <!--<div class="card-header">-->
    <!--    <h5 class="mb-0 h6">{{ translate('Wallet Recharge History')}}</h5>-->
    <!--</div>-->
    <div class="card-body">
        <table class="table aiz-table mb-0">
            <thead>
            <tr>
                <th>#</th>
                <th data-breakpoints="md">{{ translate('Amount') }}</th>
                <th data-breakpoints="md">{{ translate('Payment method') }}</th>
                <th>{{ translate('Payment Details') }}</th>
                <th data-breakpoints="md">{{ translate('Approval') }}</th>
                <th data-breakpoints="md">{{ translate('Offline payment') }}</th>
                <th data-breakpoints="md">{{ translate('Type') }}</th>
                <th data-breakpoints="md">{{ translate('Receipt') }}</th>
                <th>{{ translate('Date') }}</th>
            </tr>
            </thead>
            <tbody>
            @foreach ($rechargeList as $key => $list)
            <tr>
                <td>{{ $key+1 }}</td>
                <td>{{ single_price($list->amount) }}</td>
                <td>{{ $list->payment_method }}</td>
                <td>{{ $list->payment_details }}</td>
                <td>
                    @if ($list->approval == 1)
                    <span class="badge badge-inline"><img src="{{ static_asset('assets/img/newimg/paid.png') }}" alt="" width="14" style="margin-right:5px">{{translate('yes')}}</span>
                    @else
                    <span class="badge badge-inline"><img src="{{ static_asset('assets/img/newimg/unpickedup.png') }}" alt="" width="14" style="margin-right:5px">{{translate('No')}}</span>
                    @endif
                </td>
                <td>
                    @if ($list->offline_payment == 1)
                    <span class="badge badge-inline"><img src="{{ static_asset('assets/img/newimg/paid.png') }}" alt="" width="14" style="margin-right:5px">{{translate('yes')}}</span>
                    @else
                    <span class="badge badge-inline "><img src="{{ static_asset('assets/img/newimg/unpickedup.png') }}" alt="" width="14" style="margin-right:5px">{{translate('No')}}</span>
                    @endif
                </td>

                <td>
                    @if( $list->type == 1)

                    {{translate('User Balance')}}
                    @else

                    {{translate('Guarantee')}}
                    @endif
                </td>


                <td>{{ $list->reciept }}</td>
                <td>{{ date('Y-m-d H:i:s', strtotime($list->created_at)) }}</td>
            </tr>
            @endforeach
            </tbody>
        </table>
        <div class="aiz-pagination">
            {{ $rechargeList->links() }}
        </div>
    </div>
</div>




<!-- 充值记录 -->
<div class="card" style="display:none" >
    <div class="card-header">
        <!--<h5 class="mb-0 h6">{{ translate('Payment History')}}</h5>-->
    </div>
    <div class="card-body">
        <table class="table aiz-table mb-0">
            <thead>
            <tr>
                <th>#</th>
                <th data-breakpoints="md">{{ translate('Amount') }}</th>

                <th>{{ translate('Payment Details') }}</th>

                <th data-breakpoints="md">{{ translate('Payment method') }}</th>


                <th>{{ translate('Date') }}</th>
            </tr>
            </thead>
            <tbody>
            @foreach ($paymentList as $key => $list)
            <tr>
                <td>{{ $key+1 }}</td>
                <td>{{ single_price($list->amount) }}</td>

                <td>{{ translate($list->payment_details) }}</td>

                <td>
                    {{translate($list->payment_method)}}
                </td>
                <td>{{ date('Y-m-d H:i:s', strtotime($list->created_at)) }}</td>
            </tr>
            @endforeach
            </tbody>
        </table>
        <div class="aiz-pagination">
            {{ $paymentList->links() }}
        </div>
    </div>
</div>


@endsection

@section('modal')
<!-- offline payment Modal -->
<div class="modal fade" id="offline_wallet_recharge_modal" tabindex="-1" role="dialog"
     aria-labelledby="exampleModalLabel" aria-hidden="true">
    <div class="modal-dialog modal-dialog-centered modal-lg" role="document">
        <div class="modal-content">
            <div class="modal-header">
                <h5 class="modal-title" id="exampleModalLabel">
                    {{ translate('Offline Recharge Wallet') }}</h5>
                <button type="button" class="close" data-dismiss="modal" aria-label="Close"></button>
            </div>
            <div id="offline_wallet_recharge_modal_body"></div>
        </div>
    </div>
</div>


<div class="modal fade" id="request_modal" tabindex="-1" role="dialog" aria-labelledby="exampleModalLabel"
     aria-hidden="true">
    <div class="modal-dialog modal-dialog-centered" role="document">
        <div class="modal-content">
            <div class="modal-header">
                <h5 class="modal-title" id="exampleModalLabel">{{ translate('Send A Withdraw Request') }}</h5>
                <button type="button" class="close" data-dismiss="modal" aria-label="Close"></button>
            </div>
            @if ($balance > 5)
            <form class="" action="{{ route('seller.money_withdraw_request.store') }}" method="post">
                @csrf
                <div class="modal-body gry-bg px-3 pt-3">
                    <div class="row">
                        <div class="col">
                            <div class="" role="alert">
                                <h6>{{ translate('Your wallet balance :') }}
                                    <span style="color:#3E7FFF">${{ $balance }} </span>
                                </h6>
                            </div>

                            <div class="" role="alert">
                                <h6>{{ translate('Your guarantee balance :') }}
                                    <span style="color:#3E7FFF">${{Auth::user()->shop->bzj_money}} </span></h6>
                            </div>


                        </div>
                    </div>
                    <div class="row">
                        <div class="col-md-12">
                            <label>{{ translate('Amount')}} <span class="text-danger">*</span></label>
                        </div>
                        <div class="col-md-12">
                            <input type="number" lang="en" class="form-control mb-3" name="amount"

                                   placeholder="{{ translate('Amount') }}" required>
                        </div>
                    </div>
                    <div class="row" style="margin-bottom:5px;">

                        <div class="col-md-12">
                            <label>{{ translate('Opera Type')}}</label>
                        </div>
                        <div class="col-md-12">
                            <select name="type" class="form-control">
                                <option value="1">{{translate('User Balance')}}</option>
                                <option value="2">{{translate('guarantee')}}</option>
                            </select>
                        </div>

                    </div>
                    <div class="row" style="margin-bottom:5px;">

                        <div class="col-md-12">
                            <label>{{ translate('Withdraw Type')}}</label>
                        </div>
                        <div class="col-md-12">
                            <select name="w_type" class="form-control" id="p">
                                <option value="1">{{translate('Cash')}}</option>
                                <option value="2">{{translate('Bank')}}</option>
                                <option value="3">{{translate('USDT')}}</option>

                            </select>
                        </div>

                    </div>
                    <div class="row">
                        <div class="col-md-12">
                            <label>{{ translate('Message')}}</label>
                        </div>
                        <div class="col-md-12">
                            <textarea name="message" rows="8" class="form-control mb-3"></textarea>
                        </div>
                    </div>
                    <div class="form-group text-right">
                        <button type="submit" class="btn btn-sm btn-primary">{{translate('Send')}}</button>
                    </div>
                </div>
            </form>
            @else
            <div class="modal-body gry-bg px-3 pt-3">
                <div class="p-5 heading-3">
                    {{ translate('You do not have enough balance to send withdraw request') }}
                </div>
            </div>
            @endif
        </div>
    </div>
</div>
@endsection

@section('script')
<script type="text/javascript">
    function show_request_modal() {
        $('#request_modal').modal('show');
    }

    function show_message_modal(id) {
        $.post('{{ route('withdraw_request.message_modal') }}', {
            _token: '{{ @csrf_token() }}',
            id: id
        }, function (data) {
            $('#message_modal .modal-content').html(data);
            $('#message_modal').modal('show', {backdrop: 'static'});
        });
    }
    function show_make_wallet_recharge_modal(type){
        if( type == 2 )
        {
            $("#exampleModalLabel").text('{{translate('Guarantee Recharge')}}');
        }
        $.post('{{ route('offline_wallet_recharge_modal') }}', {type:type,_token:'{{ csrf_token() }}'}, function(data){
            $('#offline_wallet_recharge_modal_body').html(data);
            $('#offline_wallet_recharge_modal').modal('show');
        });
    }
    $("#p").change(function(){
        var usdt_status = {{$shop->usdt_payment_status}}
        var bank_payment_status = {{$shop->bank_payment_status}}
        var cash_on_delivery_status = {{$shop->cash_on_delivery_status}}
        var type = $(this).val();
        if (type == 3 && usdt_status == 0) {
            window.location.href = "/seller/profile#usdt"
            $(".btn").attr("disabled")
        }
        if (type == 2 && bank_payment_status == 0) {
            window.location.href = "/seller/profile#bank"
            $(".btn").attr("disabled")
        }
        if (type == 1 && cash_on_delivery_status == 0) {
            window.location.href = "/seller/profile#cash"
            $(".btn").attr("disabled")
        }
    })

</script>
<script>
    $('.dattu .card-header .h6').click(function () {
        $(this).addClass('active').siblings().removeClass('active');
        $('.dattu .card-body').eq($(this).index()).show().siblings('.dattu .card-body').hide()
    })
</script>

@endsection
